<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/commons/global.jsp"%>
<script type="text/javascript">
	$(function() {
        $('#shopGoodsThreeCategoryEditForm').form({
            url : '${path}/shopGoodsCategory/edit',
            onSubmit : function() {
                progressLoad();
                var isValid = $(this).form('validate');
                if (!isValid) {
                    progressClose();
                }
                return isValid;
            },
            success : function(result) {debugger;
                progressClose();
                result = $.parseJSON(result);
                if (result.success) {
                   //parent.$.modalDialog.openner_dataGrid.datagrid('reload');//之所以能在这里调用到parent.$.modalDialog.openner_dataGrid这个对象，是因为user.jsp页面预定义好了
                    parent.$.modalDialog.handler.dialog('close');
                } else {
                    var form = $('#shopGoodsThreeCategoryEditForm');
                    parent.$.messager.alert('错误', eval(result.msg), 'error');
                }
            }
        });               
    });
</script>
<div class="easyui-layout" data-options="fit:true,border:false">
	<div data-options="region:'center',border:false" title=""
		style="overflow: hidden;padding: 3px;">
		<form id="shopGoodsThreeCategoryEditForm" method="post">
			<table class="grid">
				<tr>
					<td>分类名称</td>
					<td><input name="categoryId" type="hidden"
						value="${shopGoodsCategory.categoryId}"/><input name="categoryName" type="text"
						class="easyui-validatebox" data-options="required:true"
						value="${shopGoodsCategory.categoryName}" /></td>
				</tr>
				<tr>
				</tr>
				<tr>
					<td>父级分类编号</td>
					<td><input name="categoryParentId" type="text"
						class="easyui-numberbox" data-options="required:true"
						value="${shopGoodsCategory.categoryParentId}" readonly="readonly" /></td>
				</tr>
				<%-- <tr>
				<td>父级分类名称</td>
					<td><input name="categoryParentId" type="text"
						class="easyui-numberbox" data-options="required:true"
						value="${shopGoodsCategory.categoryParentName}" readonly="readonly" /></td>
				</tr> --%>
				<tr>
					<td>排序</td>
					<td><input name="categorySort" type="text"
						class="easyui-numberspinner" style="width: 140px; height: 29px;" required="required" data-options="editable:false"
						value="${shopGoodsCategory.categorySort}" /></td>
				</tr>
				<tr>
				</tr>
				<tr>
					<td>分类关键字</td>
					<td><input name="categoryKeyword" type="text"
						class="easyui-validatebox" data-options="required:true"
						value="${shopGoodsCategory.categoryKeyword}" /></td>
				</tr>
				<tr>
				</tr>
				<tr>
					<td>分类图片</td>
					<td><input name="categoryImage" type="text"
						class="easyui-validatebox" data-options="required:true"
						value="${shopGoodsCategory.categoryImage}" /></td>
				</tr>
				<tr>
				</tr>
				<tr>
					<td>推荐标志0-不推荐 1-推荐到首页</td>
					<td><input name="categoryCommend" type="text"
						class="easyui-validatebox" data-options="required:true"
						value="${shopGoodsCategory.categoryCommend}" /></td>
				</tr>
				<tr>
				</tr>
				<tr>
					<td>默认标志，0-非默认 1-默认</td>
					<td><input name="categoryDefault" type="text"
						class="easyui-validatebox" data-options="required:true"
						value="${shopGoodsCategory.categoryDefault}" /></td>
				</tr>
			</table>
		</form>
	</div>
</div>